package com.neu.po;


public class Business {
    private Integer id;
    private String name;
    private String address;
    private String introduce;
    private double qsmoney;
    private double psmoney;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getIntroduce() {
		return introduce;
	}

	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}

	public double getQsmoney() {
		return qsmoney;
	}

	public void setQsmoney(double qsmoney) {
		this.qsmoney = qsmoney;
	}

	public double getPsmoney() {
		return psmoney;
	}

	public void setPsmoney(double psmoney) {
		this.psmoney = psmoney;
	}

	public Business(Integer id, String name, String address, String introduce, double qsmoney, double psmoney) {
		super();
		this.id = id;
		this.name = name;
		this.address = address;
		this.introduce = introduce;
		this.qsmoney = qsmoney;
		this.psmoney = psmoney;
	}
	

	
	public Business() {
		super();
		// TODO Auto-generated constructor stub
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((address == null) ? 0 : address.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((introduce == null) ? 0 : introduce.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		long temp;
		temp = Double.doubleToLongBits(psmoney);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(qsmoney);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Business other = (Business) obj;
		if (address == null) {
			if (other.address != null)
				return false;
		} else if (!address.equals(other.address))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (introduce == null) {
			if (other.introduce != null)
				return false;
		} else if (!introduce.equals(other.introduce))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (Double.doubleToLongBits(psmoney) != Double.doubleToLongBits(other.psmoney))
			return false;
		if (Double.doubleToLongBits(qsmoney) != Double.doubleToLongBits(other.qsmoney))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return   id + "\t " + name + "\t" + address + "\t" + introduce
				+ "\t" + qsmoney + "\t" + psmoney + "\n";
	}
    
    
}
